From: Florian Müllner Date: Thu, 3 Sep 2026 17:46:07 +0000 (+0200) Subject: tools/shell-lg: Stop leaking inspector X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~6^2^2~22 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2bf0116ca873c4eb7416938dc85e6e8e1c7ad45e;p=gnome-shell.git tools/shell-lg: Stop leaking inspector We currently don't destroy inspectors that we create, so we leak both the actor and the associated signalTracker. There is no need to track signals separately, just destroy the actor when we are done. Part-of: (cherry picked from commit 14045490c7e523f42a476cfeb033f35465383fb4) --- diff --git a/tools/shell-lg.sh b/tools/shell-lg.sh index ae64ca3df..65d2b8cc0 100755 --- a/tools/shell-lg.sh +++ b/tools/shell-lg.sh @@ -235,13 +235,14 @@ inspect() { Main.lookingGlass._inspector = new LookingGlass.Inspector(Main.lookingGlass); const inspector = Main.lookingGlass._inspector; - inspector.connectObject("target", (i, obj, stageX, stageY) => { + inspector.connect("target", (i, obj, stageX, stageY) => { let command = "inspect(" + Math.round(stageX) + ", " + Math.round(stageY) + ")"; Main.lookingGlass._lastInspection = command; - }, -"closed", () => { - delete Main.lookingGlass._inspector; -}); + }); + inspector.connect("closed", () => { + Main.lookingGlass._inspector.destroy(); + delete Main.lookingGlass._inspector; + }); `; AsyncFunction(command)(); '